package com.cleaningcloud.cld.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.cleaningcloud.cld.mapper.CldRegionMaterialDetailsMapper;
import com.cleaningcloud.cld.domain.CldRegionMaterialDetails;
import com.cleaningcloud.cld.service.ICldRegionMaterialDetailsService;

/**
 * 物资清单明细Service业务层处理
 * 
 * @author cleaningcloud
 * @date 2025-09-29
 */
@Service
public class CldRegionMaterialDetailsServiceImpl implements ICldRegionMaterialDetailsService 
{
    @Autowired
    private CldRegionMaterialDetailsMapper cldRegionMaterialDetailsMapper;

    /**
     * 查询物资清单明细
     * 
     * @param regionMaterialDetailsId 物资清单明细主键
     * @return 物资清单明细
     */
    @Override
    public CldRegionMaterialDetails selectCldRegionMaterialDetailsByRegionMaterialDetailsId(Long regionMaterialDetailsId)
    {
        return cldRegionMaterialDetailsMapper.selectCldRegionMaterialDetailsByRegionMaterialDetailsId(regionMaterialDetailsId);
    }

    /**
     * 查询物资清单明细列表
     * 
     * @param cldRegionMaterialDetails 物资清单明细
     * @return 物资清单明细
     */
    @Override
    public List<CldRegionMaterialDetails> selectCldRegionMaterialDetailsList(CldRegionMaterialDetails cldRegionMaterialDetails)
    {
        return cldRegionMaterialDetailsMapper.selectCldRegionMaterialDetailsList(cldRegionMaterialDetails);
    }

    /**
     * 新增物资清单明细
     * 
     * @param cldRegionMaterialDetails 物资清单明细
     * @return 结果
     */
    @Override
    public int insertCldRegionMaterialDetails(CldRegionMaterialDetails cldRegionMaterialDetails)
    {
        return cldRegionMaterialDetailsMapper.insertCldRegionMaterialDetails(cldRegionMaterialDetails);
    }

    /**
     * 修改物资清单明细
     * 
     * @param cldRegionMaterialDetails 物资清单明细
     * @return 结果
     */
    @Override
    public int updateCldRegionMaterialDetails(CldRegionMaterialDetails cldRegionMaterialDetails)
    {
        return cldRegionMaterialDetailsMapper.updateCldRegionMaterialDetails(cldRegionMaterialDetails);
    }

    /**
     * 批量删除物资清单明细
     * 
     * @param regionMaterialDetailsIds 需要删除的物资清单明细主键
     * @return 结果
     */
    @Override
    public int deleteCldRegionMaterialDetailsByRegionMaterialDetailsIds(Long[] regionMaterialDetailsIds)
    {
        return cldRegionMaterialDetailsMapper.deleteCldRegionMaterialDetailsByRegionMaterialDetailsIds(regionMaterialDetailsIds);
    }

    /**
     * 删除物资清单明细信息
     * 
     * @param regionMaterialId 物资清单主键
     * @return 结果
     */
    @Override
    public int deleteCldRegionMaterialDetailsByRegionMaterialDetailsId(Long regionMaterialId)
    {
        return cldRegionMaterialDetailsMapper.deleteCldRegionMaterialDetailsByRegionMaterialId(regionMaterialId);
    }
}
